package main

import (
	"github.com/RaymondCode/simple-demo/config"
	"github.com/RaymondCode/simple-demo/repository/impl"
	"github.com/RaymondCode/simple-demo/router"
	"github.com/RaymondCode/simple-demo/util/jwtutil"
	"github.com/RaymondCode/simple-demo/util/rabbitutil"
	"github.com/RaymondCode/simple-demo/util/redisutil"
	"github.com/cloudwego/hertz/pkg/app/server"
)

func init() {
	// 配置文件初始化
	config.Init()
	// 数据库初始化
	impl.Init()
	// jwt初始化
	jwtutil.InitJWT()
	// redis初始化
	redisutil.Init()
	// 消息队列初始化
	rabbitutil.Init()
	// 开始定时任务
	//job.StartJob()
}

func main() {

	h := server.Default()

	router.InitRouter(h)

	h.Run() // listen and serve on 0.0.0.0:8080
}
